<?php
defined('_XR_EXEC') or die();
/**
 * 逻辑处理类 
 */
class sendfen_Model extends Model
{ 
	
	
	public function updatefen($id){
		$db = factory::getdbo();
		$rs_sendfen = $db->loadassoc('select * from t_sendfen where id="'.$id.'" ');
		if(!$rs_sendfen){
			return false;
		}
		return $db->update('sendfen',array(
			'id'=>$id,
			'users'=>$db->loadresult('select count(*) from t_send where sendfen_id="'.$id.'" '), 
			'packetnum'=>count( $db->loadassoclist('select distinct(packet) from t_send where  sendfen_id="'.$id.'" ') ),
			'updated'=>'now()',
			'updated_user_id'=>factory::module('admin')->getuserid()
		));
	}
 
	
	
	
	
}

?>